Skip to content

Conversation

Harsh9485
Copy link
Contributor

@Harsh9485 Harsh9485 commented Aug 21, 2025

Closes #239

/claim #239

Description

video :- https://www.loom.com/share/d1d1d54d48bc45c4a48271ca9a387a88?sid=933e250d-78f8-4a7f-9745-0e908c0ee4d9

Type of Change

  • New module
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path: registry/coder/modules/aider
New version: v1.0.0
Breaking change: [ ] Yes [x] No

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun run fmt)
  • Changes tested locally

Related Issues

@Harsh9485
Copy link
Contributor Author

@matifali @DevelopmentCats, most of the module works fine, but now I’m implementing MCP configuration and task prompts with active chatting.

Screenshot 2025-08-21 202353

The --message flag disables chat mode, runs only the prompt, and then exits the program. I’m trying to find a way to keep chat mode running inside the module.

@matifali
Copy link
Member

@Harsh9485, I think we should run in chat mode using AgentAPI by default, but provide the option to use message mode and disable AgentAPI (i.e., Coder Tasks) integration if a user wants to run in that mode.

@Harsh9485
Copy link
Contributor Author

@Harsh9485, I think we should run in chat mode using AgentAPI by default, but provide the option to use message mode and disable AgentAPI (i.e., Coder Tasks) integration if a user wants to run in that mode.

So should I give the user three options:
1 Empty prompt (works fine),
2 Task prompt,
3 Run the Aider module with a task prompt (runs only once and disables AgentAPI)

@matifali
Copy link
Member

So should I give the user three options:
1 Empty prompt (works fine),
2 Task prompt,
3 Run the Aider module with a task prompt (runs only once and disables AgentAPI)

Yes @Harsh9485

@Harsh9485
Copy link
Contributor Author

@matifali, unfortunately we can’t run interactive mode with the --message flag. What should I do now?

@Harsh9485
Copy link
Contributor Author

@matifali @DevelopmentCats. PR ready to review.

@Harsh9485
Copy link
Contributor Author

@matifali @DevelopmentCats, I have added the MCP server configuration.

@Harsh9485
Copy link
Contributor Author

@matifali @DevelopmentCats, let me know if you need any changes in the code.

@matifali matifali assigned matifali and unassigned matifali Sep 19, 2025
@DevelopmentCats
Copy link
Contributor

The Aider agent doesn't have native support for MCP configuration. Is it okay if I use third-party software? and please let me know what should I do?

What do you think @DevelopmentCats and @35C4n0r

I think that since we don't have a realistic eta on when aider might add MCP support, our best option would be to use: https://github.com/lutzleonhardt/mcpm-aider at least until it is updated on aider's end.

@Harsh9485
Copy link
Contributor Author

@DevelopmentCats, sorry, I didn’t see your message earlier. I’ve added MCPM-aider, and now I’ve found a way to add the Coder MCP server to it.

@Harsh9485
Copy link
Contributor Author

Tried adding Coder MCP server via mcpm-aider add, but env vars aren’t supported.

Screenshot 2025-10-02 131523

@Harsh9485
Copy link
Contributor Author

Hey @matifali, @DevelopmentCats, I think we should drop the idea of configuring the Coder MCP server for now. Once Aider supports MCP, I’ll implement it.
Also, we shouldn’t use the TASK prompt for interactive mode. When a user gives a TASK prompt, it’s only sent once, and when the output is completely fetched, both Aider and AgentAPI exit. Because of this, the user can’t see the output properly. I think that’s kind of a bug.

@DevelopmentCats
Copy link
Contributor

Hey @matifali, @DevelopmentCats, I think we should drop the idea of configuring the Coder MCP server for now. Once Aider supports MCP, I’ll implement it. Also, we shouldn’t use the TASK prompt for interactive mode. When a user gives a TASK prompt, it’s only sent once, and when the output is completely fetched, both Aider and AgentAPI exit. Because of this, the user can’t see the output properly. I think that’s kind of a bug.

A lot of these CLI modules have a similar issue that we have had to work around. AgentAPI now supports an -I flag so for this you would want to pass the prompt into the session with that so that way we aren't locked into a print style output.

As for the MCP Server issue I'm honestly not too sure when we would be seeing this since Development on aider seems to have slowed down exponentially in the last few months.

@Harsh9485
Copy link
Contributor Author

If any CLI module already uses the -I flag, @DevelopmentCats could you share its name? It would really help.

@DevelopmentCats
Copy link
Contributor

If any CLI module already uses the -I flag, @DevelopmentCats could you share its name? It would really help.

The copilot module that was just released uses this flag.

@Harsh9485
Copy link
Contributor Author

@DevelopmentCats, this commit shows my approach to implementing the mcpm-aider bridge.

@DevelopmentCats
Copy link
Contributor

@Harsh9485

Can we drop the idea of report_task support until Aider implements mcp support?

Can you revert this so we aren't using mcpm-aider anymore, and verify this at least works with agentapi?

@Harsh9485
Copy link
Contributor Author

@DevelopmentCats, did we fix the agentapi -l flag error?

@DevelopmentCats
Copy link
Contributor

@DevelopmentCats, did we fix the agentapi -l flag error?

What issue where you getting with the -I flag?

@Harsh9485
Copy link
Contributor Author

I mentioned the error in this Discord thread. https://discord.com/channels/747933592273027093/1425453418998403169

@Harsh9485
Copy link
Contributor Author

agentapi without task prompt 🟢

Screenshot 2025-10-18 095302 Screenshot 2025-10-18 095325

@Harsh9485
Copy link
Contributor Author

I'm running into that flag error, and that is the full error message :

`
Provider: google
Module: gemini

API key provided !
Starting in directory: /home/coder
Using Initial Prompt to Start agentapi with Task Prompt
Error: unknown shorthand flag: 'I' in -I=
You are a helpful Coding assistant. Aim to autonomously investigate
hey
Usage:
agentapi server [agent] [flags]

Flags:
-a, --allowed-hosts strings HTTP allowed hosts (hostnames only, no ports). Use '' for all, comma-separated list via flag, space-separated list via AGENTAPI_ALLOWED_HOSTS env var (default [localhost,127.0.0.1,[::1]])
-o, --allowed-origins strings HTTP allowed origins. Use '
' for all, comma-separated list via flag, space-separated list via AGENTAPI_ALLOWED_ORIGINS env var (default [http://localhost:3284,http://localhost:3000,http://localhost:3001])
-c, --chat-base-path string Base path for assets and routes used in the static files of the chat interface (default "/chat")
-h, --help help for server
-p, --port int Port to run the server on (default 3284)
-P, --print-openapi Print the OpenAPI schema to stdout and exit
-H, --term-height uint16 Height of the emulated terminal (default 1000)
-W, --term-width uint16 Width of the emulated terminal (default 80)
-t, --type string Override the agent type (one of: aider, amp, auggie, claude, codex, cursor, cursor-agent, custom, gemini, goose, custom)

unknown shorthand flag: 'I' in -I=
You are a helpful Coding assistant. Aim to autonomously investigate
hey
`

@Harsh9485
Copy link
Contributor Author

@matifali @DevelopmentCats, I think most of the work is done. check the changes and let me know if I need to change or do anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Aider Module: Tasks+AgentAPI Support

3 participants